package com.xhui.vimarket.zkplus.zul.attr.bus.impl;

import lombok.Getter;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.util.GenericForwardComposer;
com.xhui.vimarket.zkplusui.vimarket.zkplus.util.Compcom.xhui.vimarket.zkplusrt com.xhui.vimarket.zkplus.zul.attr.bus.IAtcom.xhui.vimarket.zkpluser;
import com.xhui.vimarket.zkplus.zul.attr.bus.IAttrBusDivComposer;

/**
 * .
 * 
 * @版权：福富软件 版权所有 (c) 2011
 * @author wuyx
 * @version Revision 1.0.0
 * @see:
 * @创建日期：2012-1-17
 * @功能说明：
 * 
 */
public class BaseAttrBusDextComposer extends GenericForwardComposer implements IAttrBusDextComposer {
    
    /**
     * serialVersionUID.
     */
    private static final long   serialVersionUID = 1L;
    
    /**
     * attrBusDivComposer.
     */
    @Getter
    private IAttrBusDivComposer attrBusDivComposer;
    
    @Override
    public void doAfterCompose(Component comp) throws Exception {
        super.doAfterCompose(comp);
        // 保存composer 到界面
        ComposerUtil.setComposer(comp, this);
    }
    
    /**
     * com.xhui.vimarket.zkplus     * 
     * @see com.xhui.vimarket.zkplucom.xhui.vimarket.zkplusAttrBusDivComposer#setAttrBus(com.xhui.vimarket.zkplus.zul.attr.bus.AttrBus)
     * @author wuyx
     *         2012-1-16 wuyx
     */
    @Override
    public void setAttrBusDivComposer(IAttrBusDivComposer attrBusDivComposer) {
        this.attrBusDivComposer = attrBusDivComposer;
    }
    
    /**
     * .
     * 
     * @param procName String
     * @param obj Object
     * @author wuyx
     *         2012-1-16 wuyx
     */
    public void fireProcListener(String procName, Object obj) {
        if (this.attrBusDivComposer != null) {
            this.attrBusDivComposer.fireProcListener(procName, obj);
        }
    }
    
}
